import pyefun as efun
import pyefun.excel as efExcel
import win32com.client as 对象
import win32api,pythoncom
import multiprocessing
import win32com.client,os,time,win32com,pythoncom,threading,pyefun,asyncio
 # with efExcel.ExcelOperate() as eo:
 #     if eo.method == "创建方式":
 #        eo.open("D:\\d1.xlsx")
def test(j):
    print(os.getpid())
    for i in range(j):
        print(i)
        time.sleep(1)
if __name__ == "__main__":
    p1 = multiprocessing.Process(target=efExcel.多进程com创建excel)
    # p1 = multiprocessing.Process(target=efExcel.多进程com创建excel())# 此中方法会出BUG ，禁止使用，多进程用上面的方法
    p2 = multiprocessing.Process(target=test,args=(10,))
    p1.start()
    p2.start()